<?php require 'header.php';?>
<div class="mainDiv">
  <div class="innerMain">
    <div class="innerTab"> <span class="announceT">礼品兑换</span> </div>
    <div class="giftDiv">
      <div class="giftDetail">
        <ul class="giftDetailUl">
		<?php
		if($_tpl['rs']){
			if($_COOKIE['skey']) $token = md5($_COOKIE['skey'].core_lib_constant::COOKIE_KEY);
			foreach($_tpl['rs'] as $v){
				$url = Qtpl::createUrl('gift', 'exchange', array('gid'=>Qutil::enId($v['gid']),'token'=>$token));
		?>
          <li><img src="<?php echo $v['pic_url'];?>" class="giftPic">
            <p class="giftDesc"><?php echo $v['gift_name'];?></p>
            <p class="giftDesc">所需积分：<span><?php echo $v['rank'];?></span></p>
            <a href="<?php echo $url;?>" onclick="return confirm('你确定要兑换：<?php echo $v['gift_name'];?>？');" class="exchange">立即兑换</a>
          </li>
		<?php }}?>
        </ul>
      </div>
      <div class="giftUserInfo">
        <h2 class="userCenter">个人中心</h2>
        <div class="userInfoDetail">
          <div class="userInfoDetailNologin" style="display: none;">
            <p>百度安全中心欢迎您</p>
            <p>如果您提出的漏洞使得百度产品更安全，我们将联系您，赠送非常丰富的奖品。</p>
            <p>未登录，请<a href="javascript:void(0);" id="leftLoginBtn">登录</a>填写个人信息</p>
          </div>
          <div class="userInfoDetaillogin" style="">
            <p><span id="userLoginName">【惜☆缘】</span>（<a href="javascript:void(0);" id="updateInfoBtn">修改个人信息</a>）</p>
            <ul class="userInfoDetailloginUl">
              <li> <span class="userInfoDetailloginUlt">用户积分：</span> <span class="userInfoDetailloginUlf1" id="userScore">0</span> </li>
              <li> <span class="userInfoDetailloginUlt">联系地址：</span> <span class="userInfoDetailloginUlf">暂无</span> <span class="userInfoDetailloginUlf1" id="getUserAddr">暂无</span> </li>
              <li> <span class="userInfoDetailloginUlt">联系电话：</span> <span class="userInfoDetailloginUlf">暂无</span> <span class="userInfoDetailloginUlf1" id="getUserTel">暂无</span> </li>
              <li> <span class="userInfoDetailloginUlt">电子邮箱：</span> <span class="userInfoDetailloginUlf">暂无</span> <span class="userInfoDetailloginUlf1" id="getUserMail">暂无</span> </li>
              <li> <span class="userInfoDetailloginUlt">真实姓名：</span> <span class="userInfoDetailloginUlf">暂无</span> <span class="userInfoDetailloginUlf1" id="getUserName">【惜☆缘】</span> </li>
              <li> <span class="userInfoDetailloginUlt">邮政编码：</span> <span class="userInfoDetailloginUlf">暂无</span> <span class="userInfoDetailloginUlf1" id="getUserPcode">暂无</span> </li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<?php require 'footer.php';?>